/*
 * ============================================================================
 * = COPYRIGHT
 *          PAX Computer Technology(Shenzhen) Co., Ltd. PROPRIETARY INFORMATION
 *   This software is supplied under the terms of a license agreement or nondisclosure
 *   agreement with PAX Computer Technology(Shenzhen) Co., Ltd. and may not be copied or
 *   disclosed except in accordance with the terms in that agreement.
 *     Copyright (C) 2021 PAX Computer Technology(Shenzhen) Co., Ltd. All rights reserved.
 * ============================================================================
 */

import 'package:pigeon/pigeon.dart';


@ConfigurePigeon(PigeonOptions(
    dartOut: 'lib/auto_pigeon/poslink_sdk_form.dart',
    javaOptions: JavaOptions(
      className: 'POSLinkForm',
      package: 'com.example.pos_link.pigeon',
    ),
    objcOptions: ObjcOptions(prefix: ''),
    javaOut: './android/src/main/java/com/example/pos_link/pigeon/POSLinkForm.java',
  ),
)
class FormRemoveCardRequest {
  String? message1;
  String? message2;
  FormContinuousScreen? continuousScreen;
  FormPinpadType? pinpadType;
}

class FormShowDialogFormRequest {
  String? title;
  String? label1;
  FormLabelProperty? label1Property;
  String? label2;
  FormLabelProperty? label2Property;
  String? label3;
  FormLabelProperty? label3Property;
  String? label4;
  FormLabelProperty? label4Property;
  FormButtonType? buttonType;
  String? timeout;
  FormContinuousScreen? continuousScreen;
}

class FormStbButton {
  String? name;
  String? color;
  FormHardKey? hardKey;
}

class FormShowTextBoxRequest {
  String? title;
  String? text;
  FormStbButton? button1;
  FormStbButton? button2;
  FormStbButton? button3;
  String? timeout;
  FormEnableKeyType? enableKeyType;
  String? hardKeyList;
  FormSignatureBoxType? signatureBox;
  FormContinuousScreen? continuousScreen;
  FormBarcodeName? barcodeName;
  String? barcodeData;
  String? inputTextTitle;
  FormInputTextType? inputText;
  FormInputType? inputType;
  String? minLength;
  String? maxLength;
}

class FormSdButton {
  String? name;
}

class FormShowDialogRequest {
  String? title;
  FormSdButton? button1;
  FormSdButton? button2;
  FormSdButton? button3;
  FormSdButton? button4;
  String? timeout;
  FormContinuousScreen? continuousScreen;
}

class FormShowMessageRequest {
  String? displayMessage1;
  String? title;
  String? displayMessage2;
  FormTextPushedMode? textPushedMode;
  String? taxLine;
  String? totalLine;
  String? imageName;
  String? imageDescription;
  FormLineItemAction? lineItemAction;
  String? itemIndex;
}

class FormItemDetail {
  String? productName;
  String? pluCode;
  String? price;
  FormItemDetailUnit? unit;
  String? unitPrice;
  String? tax;
  String? quantity;
  String? productImageName;
  String? productImageDescription;
}

class FormShowItemRequest {
  String? title;
  FormTextPushedMode? textPushedMode;
  String? taxLine;
  String? totalLine;
  List<FormItemDetail?>? itemDetails;
  FormLineItemAction? lineItemAction;
  String? itemIndex;
}

class FormClearMessageRequest {
  String? classID;
}

class FormInputTextRequest {
  FormInputTextPrompt? title;
  FormInputType? inputType;
  String? minLength;
  String? maxLength;
  String? defaultValue;
  String? timeout;
  FormContinuousScreen? continuousScreen;
}

class FormShowMessageCenterRequest {
  String? title;
  String? message1;
  String? message2;
  String? timeout;
  FormPinpadType? pinpadType;
  String? iconName;
}

class FormShowMessageCenterResponse {
  String? responseCode;
  String? responseMessage;
  FormPinpadType? pinpadType;
}

class FormClearMessageResponse {
  String? responseCode;
  String? responseMessage;
}

class FormInputTextResponse {
  String? responseCode;
  String? responseMessage;
  String? text;
}

class FormRemoveCardResponse {
  String? responseCode;
  String? responseMessage;
  FormPinpadType? pinpadType;
}

class FormShowDialogFormResponse {
  String? responseCode;
  String? responseMessage;
  String? labelSelected;
}

class FormShowDialogResponse {
  String? responseCode;
  String? responseMessage;
  String? buttonNumber;
}

class FormShowMessageResponse {
  String? responseCode;
  String? responseMessage;
}

class FormShowItemResponse {
  String? responseCode;
  String? responseMessage;
}

class FormShowTextBoxResponse {
  String? responseCode;
  String? responseMessage;
  String? buttonNumber;
  FormSignatureStatus? signStatus;
  String? signatureData;
  String? text;
}

enum FormSignatureStatus {
  NotSet,
  NotDoneTheSignature,
  DoneTheSignature,
}

enum FormPinpadType {
  NotSet,
  InternalPinpad,
  ExternalPinpad,
  RnibPinpad,
  ExternalPinpadFirst,
}

enum FormInputTextPrompt {
  NotSet,
  EnterAmount,
  EnterPoints,
  EnterTableNumber,
  EnterTheNumberOfGuests,
  EnterOrderNumber,
  EnterTicketNumber,
  EnterVoucherNumber,
  EnterAuthCode,
  EnterTip,
  EnterCashBack,
  EnterMerchantFee,
  EnterSurchargeFee,
  EnterYourAddress,
  EnterYourZipCode,
  EnterCustomerCode,
  EnterPoNumber,
  EnterDestinationZip,
  EnterProductDescription,
  EnterMerchantTaxId,
  EnterTaxAmount,
  EnterTaxExemptId,
  EnterReferenceNumber,
  EnterPhoneNumber,
  EnterSocialSecurity,
  EnterUserName,
  EnterCustomerServicePhone,
  EnterOriginalTransactionDate,
  EnterOriginalTransactionTime,
  EnterDate,
  EnterTime,
  EnterPassword,
}

enum FormInputType {
  NotSet,
  AlphaNumeric,
  Numeric,
  Date,
  Time,
  Currency,
  Password,
  PhoneNumber,
  SocialSecurity,
}

enum FormContinuousScreen {
  NotSet,
  Default,
  NotGoToIdleScreen,
}

enum FormTextPushedMode {
  NotSet,
  Topdown,
  BottomUp,
}

enum FormItemDetailUnit {
  NotSet,
  PerItem,
  PerPound,
  PerFoot,
}

enum FormLineItemAction {
  NotSet,
  Add,
  Update,
  Delete,
}

enum FormHardKey {
  NotSet,
  Key0,
  Key1,
  Key2,
  Key3,
  Key4,
  Key5,
  Key6,
  Key7,
  Key8,
  Key9,
  Clear,
  Cancel,
  Ok,
}

enum FormEnableKeyType {
  NotSet,
  EnableVirtualButtonAndHardKeys,
  EnableHardKeyOnly,
}

enum FormSignatureBoxType {
  NotSet,
  NoSignatureBox,
  TerminalPreference,
  HorizontalDisplay,
  VerticalDisplay,
}

enum FormBarcodeName {
  NotSet,
  Code39,
  Code128,
  Ean13,
  Ean128,
  Pdf417,
  GridMatrix,
  QrCode,
}

enum FormInputTextType {
  NotSet,
  NoInputText,
  ShowInputText,
}

enum FormLabelProperty {
  NotSet,
  Unchecked,
  Checked,
}

enum FormButtonType {
  NotSet,
  RadioButton,
  CheckBox,
}

@HostApi()
abstract class POSLinkFormApi {
   @async
   FormShowMessageCenterResponse showMessageCenter(FormShowMessageCenterRequest req);
   @async
   FormInputTextResponse inputText(FormInputTextRequest req);
   @async
   FormClearMessageResponse clearMessage(FormClearMessageRequest req);
   @async
   FormShowItemResponse showItem(FormShowItemRequest req);
   @async
   FormShowMessageResponse showMessage(FormShowMessageRequest req);
   @async
   FormShowDialogResponse showDialog(FormShowDialogRequest req);
   @async
   FormShowTextBoxResponse showTextBox(FormShowTextBoxRequest req);
   @async
   FormShowDialogFormResponse showDialogForm(FormShowDialogFormRequest req);
   @async
   FormRemoveCardResponse removeCard(FormRemoveCardRequest req);
}
